
<%@page import="com.wanmait.shoppingsys.vo.UserInfo"%>
<%@page import="com.wanmait.shoppingsys.vo.Specialty"%>
<%@page import="java.util.List"%>
<%@page import="com.wanmait.shoppingsys.util.ShopCar"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  
<% String path = request.getServletContext().getContextPath(); %>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="<%=path %>/css/reset.css">
<link rel="stylesheet" type="text/css" href="<%=path %>/css/main.css?12">

<title>特产一号店-首页</title>
</head>
<body>
	<div class="header_con">
		<div class="header">
			<div class="welcome fl">欢迎来到特产一号店!</div>
			<div class="fr">
				<div class="user_link fl">
					<a href="<%=path%>/order/index.jsp">我的购物车</a>		
			<%
            UserInfo userinfo = (UserInfo)session.getAttribute("userinfo");
            if(userinfo!=null){
            %>
            <div class="login_btn fr">
            <span>|</span>
            <a href="<%=path %>/GoodsController?action=findAll&id=<%=userinfo.getId() %>">我的订单</a>
            <span>|</span>
            <a href="<%=path %>/userinfo/shoucang.jsp">我的收藏</a>
            <span>|</span>
			<a href="<%=path %>/userinfo/info.jsp">用户中心</a>
			<span>|</span>
            <span>欢迎<%=userinfo.getName() %>登录系统</span>
            <span>|</span>
            <a href="<%=path %>/UserinfoController?action=logout">退出</a>
            </div>
            <%
            }
            else{
                %>
               	<div class="login_btn fr">
               	<span>|</span>
                <a href="<%=path %>/userinfo/register.jsp">注册</a>
               	<span>|</span>
				<a href="<%=path %>/userinfo/login.jsp">登录</a>
                </div>
                <%
                }
                %>
            
			</div>
			</div>
	</div>	
</div>		

	
	

